package com.puti.doctor.service.impl;

import com.puti.doctor.domian.HospitalDoctorInfo;
import com.puti.doctor.mapper.HospitalDoctorInfoMapper;
import com.puti.doctor.service.HospitalDoctorInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HospitalDoctorInfoServiceImpl implements HospitalDoctorInfoService {

    @Autowired
    private HospitalDoctorInfoMapper hospitalDoctorInfoMapper;

    //审核管理-待审核列表
    @Override
    public List<HospitalDoctorInfo> selectHospitalDoctorInfoList(HospitalDoctorInfo hospitalDoctorInfo) {
        return hospitalDoctorInfoMapper.selectHospitalDoctorInfoList(hospitalDoctorInfo);
    }

    //审核管理-审核列表-审核、通过、不通过        根据doctorId进行数据回显
    @Override
    public HospitalDoctorInfo selectHospitalDoctorInfoByDoctorId(Integer doctorId) {
        return hospitalDoctorInfoMapper.selectHospitalDoctorInfoByDoctorId(doctorId);
    }

    //审核管理-审核通过
    @Override
    public Integer updateHospitalDoctorInfoDoctorApproved(HospitalDoctorInfo hospitalDoctorInfo) {
        return hospitalDoctorInfoMapper.updateHospitalDoctorInfoDoctorApproved(hospitalDoctorInfo);
    }

    //审核管理-审核不通过
    @Override
    public Integer updateHospitalDoctorInfoDoctorNotApproved(HospitalDoctorInfo hospitalDoctorInfo) {
        return hospitalDoctorInfoMapper.updateHospitalDoctorInfoDoctorNotApproved(hospitalDoctorInfo);
    }

    //审核管理-审核通过列表
    @Override
    public List<HospitalDoctorInfo> selectApprovedList(HospitalDoctorInfo hospitalDoctorInfo) {
        return hospitalDoctorInfoMapper.selectApprovedList(hospitalDoctorInfo);
    }

    //审核管理-审核不通过列表
    @Override
    public List<HospitalDoctorInfo> selectNotApprovedList(HospitalDoctorInfo hospitalDoctorInfo) {
        return hospitalDoctorInfoMapper.selectNotApprovedList(hospitalDoctorInfo);
    }
}
